package com.fin.zw.aiqas.entity;

import com.fin.zw.aiqas.enums.ParamStyle;
import com.fin.zw.aiqas.enums.Status;
import com.fin.zw.aiqas.enums.Whether;
import lombok.Data;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Data
@Entity
@Table(appliesTo = "system_param", comment = "系统参数")
public class SystemParam extends BaseEntity {

    @Column(columnDefinition = "varchar(100) COMMENT '参数Code'")
    private String code;

    @Column(columnDefinition = "varchar(200) COMMENT '参数名称'")
    private String name;

    @Column(columnDefinition = "varchar(50) COMMENT '参数是否启用'")
    @Enumerated(EnumType.STRING)
    private Status status;

    @Column(columnDefinition = "varchar(200) COMMENT '参数类型（服务的端口号）'")
    private String type;

    @Column(columnDefinition = "varchar(500) COMMENT '参数值'")
    private String value;

    @Column(columnDefinition = "varchar(50) COMMENT '参数是否可修改'")
    @Enumerated(EnumType.STRING)
    private Whether sign;

    @Column(columnDefinition = "varchar(500) COMMENT '参数说明'")
    private String remark;

    @Column(columnDefinition = "varchar(200) COMMENT '备用字段'")
    private String field;

    @Column(columnDefinition = "varchar(100) COMMENT '参数类型'")
    private ParamStyle style;

    @Column(columnDefinition = "varchar(100) COMMENT '是否展示'")
    @Enumerated(EnumType.STRING)
    private Whether isShow;
}
